/**
 * Created by Administrator on 2016/4/28.
 */
$(function(){
    var size = 16;
    var name = 'xinwenzhongxin';

    geetdata("hxclub/articledetail/list.do?", {
        cid:903,
        status:1,
        pageNo:1,
        pageSize:size
    }, "#mtgz", "mtgz_list", name, true, ZZ);


    function initPagination1(name) {

        //var value = $.cookie(name);
        var value = $.cookie(name);
        var opation = JSON.parse(value);
        var num_entries = opation.total; // $("#hiddenresult div.result").length;

        // 创建分页
        $("#Pagination1").pagination(num_entries, {
            num_edge_entries: 1, //边缘页数
            num_display_entries: 5, //主体页数
            callback: pageselectCallback,
            items_per_page: size, //每页显示1项
            prev_text:'上一页',
            next_text:'下一页',
            num_edge_entries:true
        });
    };

    function pageselectCallback(page_index, jq) {
        /*console.info(jq);*/
        toPage(page_index+1,'xinwenzhongxin', 'hxclub/article/pagelist.do', '#mtgz', 'mtgz_list', null, false, ZZ);
        return false;
    }

    function ZZ() {
        initPagination1(name);
        var a = $("#gPage").width();
        var b = a/2;
        $("#gPage").css("margin-left",-b);
    }



});
/**
 * Created by Administrator on 2016/5/10.
 */
